// src/plugins/plugin-parameter/index.d.ts
import React from 'react';
import {ControlFilled, SearchOutlined} from "@ant-design/icons";
import {Button, Flex, message} from "antd";
import DrawParameterManagement from "./component/ParameterManagement";


const DrawParameter = (ctx) => {

    const handleSearch = () => {
        message.warning('搜索待开发');
    };

    return {
        exports() {
            return {
                data: '参数管理插件数据',
                refreshParameters: () => {
                    // 刷新参数的方法
                },
            };
        },

        init() {
            ctx.skeleton.add({
                area: 'leftArea',
                name: 'DrawParameterPane',
                type: 'PanelDock',
                props: {
                    icon: <ControlFilled  style={{ fontSize: '20px' }} />,
                    title: '参数',
                },
                content: (
                    <div style={{ padding: 10, backgroundColor: "white"}}>
                        <DrawParameterManagement/>
                    </div>
                ),
            });

            ctx.logger.log('参数管理插件已加载');
        },
    };
};

DrawParameter.pluginName = 'DrawParameter';
DrawParameter.meta = {
    dependencies: [],
    engines: {
        lowcodeEngine: '^1.0.0',
    },
};

export default DrawParameter;